ISCModelObject Interface
The following table contains information on the ISCModelObject interface:
Signature |
Description |
Valid Arguments |
---|---|---|
ISCModelPropertyCollection * CollectProperties(VARIANT ClassIds [optional], VARIANT MustBeOn [optional], VARIANT MustBeOff [optional]) |
Returns a property collection of the type that you require |
ClassIds:
MustBeOn:
MustBeOff:
|
Setting certain filter criteria can influence the effectiveness of data retrieving. For example, setting the MustBeOn filter to SCD_MPF_DERIVED builds a collection with only the calculated and derived properties. Requests to evaluate the calculated and derived properties will reduce performance while iterating over the collection. However, setting the MustBeOff filter to the same value, SCD_MPF_DERIVED, which excludes the calculated and derived properties, improves performance.
Example 17
The following example illustrates how to filter properties using C++. The example uses a Model Object object from Example 9:
void GetProperties(ISCModelObjectPtr & scObjPtr) { ISCModelPropertyCollectionPtr propColPtr; propColPtr = scObjPtr->GetProperties(); // no filtering VARIANT valFlags; V_VT(&valFlags) = VT_I4; V_I4(&valFlags) = SCD_MPF_SCALAR; propColPtr = scObjPtr->CollectProperties(vtMissing, valFlags, vtMissing); // scalar properties only propColPtr = scObjPtr->CollectProperties(vtMissing, vtMissing, valType); // non-scalar properties only }
The following example illustrates how to filter properties using Visual Basic .NET. The example uses a Model Object object from Example 9:
Public Sub( ByRef scObj As SCAPI.ModelObject ) Dim scObjProperties As SCAPI.ModelProperties scObjProperties = scObj.Properties ' no filtering scObjProperties = scObj.CollectProperties(, SCD_MPF_SCALAR) ' scalar properties only scObjProperties = scObj.CollectProperties(, , SCD_MPF_SCALAR) ' non-scalar properties only End Sub
Copyright © 2025 Quest Software, Inc. |